1. Field of the Invention
The present invention relates to a numerical control apparatus and a numerical control method applicable commonly to a controller (a motion controller, a sequencer, a robot controller, a sewing machine or the like) giving an instruction to a machine (an assembler, a measuring instrument, a conveyor, a robot, a sewing machine or the like) travelling along an instructed path, and more particularly, to a numerical control apparatus and a numerical control method of a machine tool.
2. Description of the Related Art
FIG. 25 illustrates the configuration of an ordinary numerically controlled (NC) machine. In FIG. 25, the NC machine includes a numerical control (NC) program 101, a numerical control (NC) apparatus 102, a servo amplifier 103, a motor 104, and a machine tool 105. First, a path along which the machine tool 105 is to travel is described in the NC program 101. Then, the NC apparatus 102 gives an instruction from time to time to the servo amplifier 103 so that the machine tool 105 travels along the path described in the NC program 102. The servo amplifier 103 drives the machine tool 105 by rotating the motor 104 in compliance with the given instruction.
At this point, the NC apparatus 102 is required to have only a slight deviation from a path specified by the NC program 101 (locus accuracy) and to travel in a short period of time. These two requirements have a trade-off relationship. For example, travelling along a corner portion or a small-diameter curvature portion at a high speed leads to saturation of the output torque of the motor 104, impossibility of the machine tool 105 to follow the travel, or occurrence of a mechanical vibration, thus requiring a reduction in speed. This results in a longer period of time of travel. This is similar to a case of driving a car, where it is necessary to reduce the speed before reaching a corner.
While a locus accuracy error of null is of course ideal, an allowable range of locus accuracy (allowable error) is provided in practice, and it suffices that a locus accuracy is within this range. Rather, positive correction of the paths within an allowable range would permit reduction of the travelling time while satisfying restrictions on locus accuracy. When passing through the path, in general, in order to avoid saturation of the output torque of the motor 104, the normal acceleration (acceleration in a direction transverse to the travelling direction) should be up to a certain value. The normal acceleration is proportional to a square of the travelling speed, and is proportional to the curvature (=1/radius of curvature). Therefore, in order to increase the travelling speed under a restriction requiring the normal acceleration to be up to an allowable value, it is effective to reduce the curvature (to increase the radius). The principle is the same as that of car driving in that a larger radius of road leads to a higher travelling speed. An example is a method shown in FIG. 26.
FIG. 26 illustrates a method described in the Programming Manual of Mitsubishi Numerical Control Unit "MELDAS 300 Series" (published by Mitsubishi Electric Corporation). In FIG. 2, 101 is an NC program, 102 is an NC apparatus, 201 is an NC program interpreter, 202 is an arc inserting section, 203 is an interpolation-acceleration/deceleration section, 205 is an original path, 206 is a path after correction, and 207 is an instruction to a servo amplifier. The NC apparatus 102 is composed of the program interpreter 201, the arc inserting section 202, and the interpolation-acceleration/deceleration section 203.
FIG. 27 illustrates a typical NC program for the application of the conventional method. In the NC program 101, a specific code (R) and a numerical value indicative of the arc radius are described at a position where an arc is to be inserted.
The NC program interpreter 201 interprets the NC program and generates an original path 205 (name give to discriminate from the path after correction described later). The arc inserting section 202 inserts an arc at a position corresponding to a particular code (R). Interpolation and acceleration or deceleration are performed at the interpolation-acceleration/deceleration section 203 in accordance with the path after correction 206, and an instruction 207 to the servo amplifier is prepared.
FIG. 28 illustrates the result of path correction by the above-mentioned conventional method. The path is corrected into a form having an arc inserted at a corner. While the curvature is infinite at the corner (Pj) in the original path, the curvature along the arc in this method is 1/(arc radius). In this method, therefore, it is possible to increase the travelling speed, bringing about an advantage of a shorter travelling time than in the travel on the original path.
A similar method is disclosed in Japanese Unexamined Patent Publication or Laid-Open No. H07-210,225. This is another method of inserting an arcuate block at a corner portion. This patent publication describes conditions for insertion of an arc, the manner of selecting an arc radius and the speed upon passing through the arc.
In the above-mentioned method, however, only the tangential directions (angles) are made smoothly continuous, still involving the problem of the curvature (=1/radius of curvature) not being continuous.
FIG. 29 illustrates the angle and the curvature of a path corrected by the conventional method. As is clear from FIG. 29, while the angle is continuous, the curvature is not continuous with a step formed at the boundary between the straight and arcuate portions. When such a portion showing discontinuity of curvature is passed across at a constant speed, the normal acceleration also shows discontinuity, producing a mechanical vibration as shown in FIG. 30, and resulting in deterioration of locus accuracy. This is just like an abrupt manipulation of the steering wheel when driving a car.
Or, when the speed is sufficiently reduced before reaching the boundary between the straight and arcuate portions, the normal acceleration would naturally become smaller, but this involves a problem of a longer travelling time.
The present invention is intended to obviate the above-mentioned problems and has for its object to provide a novel and improved numerical control apparatus and method which is capable of permitting travelling at a joint between paths at a high accuracy and a high speed, and at the same time allowing simple and rapid calculations for such a purpose.